package com.unionpay.fsas.encrypt.encryptionmachine;

/**
 * @author caoqc
 * @Description: 加密机服务
 * @date 2021/11/19 16:57:45
 */
public interface EncryptionMachineService {

    /**
     * 敏感信息加密
     *
     * @param certKey
     * @param encryptionInfo
     * @return
     */
    EncryptionResult sensitiveInfoEncryption(String certKey, EncryptionInfo encryptionInfo);


    /**
     * 敏感信息解密
     *
     * @param certKey
     * @param sensitiveInfo
     * @param secretKey
     * @return
     */
    String sensitiveInfoDecode(String certKey, String sensitiveInfo, String secretKey);


    /**
     * 验签
     *
     * @param certKey
     * @param msg
     * @param sign
     * @param signSn  签名证书序列号
     * @return
     */
    boolean veritySign(String certKey, String msg, String sign, String signSn);


    /**
     * 签名
     *
     * @param certKey
     * @param signSn
     * @param msg
     * @return
     */
    String sign(String certKey, String signSn, String msg);


}
